<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

use App\Http\Controllers\Driver\UserController;
use App\Http\Controllers\Api\OrderController;
use App\Http\Controllers\Api\BannerController;
use App\Http\Controllers\Api\CommonController;

//注册
Route::post('register', [CommonController::class,'register']);
//首页-司机信息
Route::get('index/info', [UserController::class,'getInfo']);
//首页-统计待出行
Route::get('index/count/travel', [OrderController::class,'getPendingTravel']);
//首页-轮播图
Route::get('index/banner/list', [BannerController::class,'getBannerList']);
//我的-订单列表(服务/指派订单)
Route::get('index/order/list', [OrderController::class,'getIndexOrderList']);
//待出行-订单列表
Route::get('wait/order/list', [OrderController::class,'getWaitOrderList']);
//我的-订单列表
Route::get('my/order/list', [OrderController::class,'getMyOrderList']);
//我的-服务订单统计
Route::get('my/count/service', [OrderController::class,'countOrder']);
//我的-上报异常
Route::post('my/abnormal/add', [UserController::class,'abnormalAdd']);
//我的-数字人民币
Route::get('my/wallet/list', [CommonController::class,'walletList']);
//我的-实名认证信息
Route::get('my/auth/info', [UserController::class,'getAuthInfo']);
//我的-车辆信息
Route::get('my/cart/info', [UserController::class,'getCartInfo']);
//我的-设置-修改密码
Route::post('my/account/modify/password', [CommonController::class,'register']);
//我的-停止接单
Route::post('my/stop/order', [UserController::class,'stopOrder']);
//订单详情
Route::get('order/info', [OrderController::class,'getOrderInfo']);
//首页-我的信息
Route::get('my/info', [UserController::class,'getInfo']);
//首页-抢单
Route::post('index/rob/order', [UserController::class,'orbOrder']);
//订单核销
Route::post('order/write/off', [UserController::class,'writeOffOrder']);
//触发预警
Route::post('order/waring', [UserController::class,'waringOrder']);
//开始接单
Route::post('my/start/order', [UserController::class,'startOrder']);
//订单申诉
Route::post('order/appeal', [UserController::class,'orderAppeal']);
//修改订单(距离)
Route::post('order/modify/distance', [UserController::class,'modifyOrderDistance']);
// 记录司机开始出发去接乘客的时间 20230814 by LC
Route::post('order/driver_start_time', [UserController::class,'updateOrderDriverTime']);
// 记录司机接到乘客的时间 20230814 by LC
Route::post('order/driver_arrived_time', [UserController::class,'updateOrderDriverTime']);

//==================B端==================
//承包信息
Route::get('enterprise/info', [UserController::class,'getEnterpriseInfo']);
//上传里程
Route::post('mileage/save', [UserController::class,'mileageAdd']);
//里程详情
Route::get('mileage/info', [UserController::class,'mileageInfo']);
//历史里程
Route::get('mileage/history/list', [UserController::class,'mileageHistoryList']);
